import { configureStore } from "@reduxjs/toolkit";
import { setupListeners } from "@reduxjs/toolkit/dist/query";
import studentApi from "./studentApi";
const store = configureStore({
  reducer: {
    [studentApi.reducerPath]: studentApi.reducer
  },
  // getDefaultMiddleware 返回当前store所有的默认中间价
  middleware: getDefaultMiddleware => getDefaultMiddleware().concat(studentApi.middleware)
});

setupListeners(store.dispatch);

export default store